
i = 0
while i <= 20:
    if i % 3 == 0:
        print(i )
    i += 1
print()


for i in range(0, 21):
    if i % 3 == 0:
        print(i )
print()